﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutomatedTP
{
    /// <summary>
    /// Class for storing information about tested operation
    /// </summary>
    public abstract class Operation
    {
        private Variable variable;
        private string trace;
    
        public int instance { get; set; }        

        //instance 0 means always
        /// <summary>
        /// Initializes a new instance of the <see cref="Operation"/> class.
        /// </summary>
        /// <param name="variable">The variable.</param>
        /// <param name="instance">The instance.</param>
        public Operation(Variable variable, int instance = 0)
        {
            this.instance = instance;
            this.variable = variable;
        }

        /// <summary>
        /// Gets the trace.
        /// </summary>
        /// <returns></returns>
        public string GetTrace()
        {
            return trace;
        }

        /// <summary>
        /// Gets the variable.
        /// </summary>
        /// <returns></returns>
        public Variable GetVariable()
        {
            return variable;
        }

        /// <summary>
        /// Sets the variable.
        /// </summary>
        /// <param name="variable">The variable.</param>
        public void SetVariable(Variable variable)
        {
            this.variable = variable;
        }

        /// <summary>
        /// Sets the trace.
        /// </summary>
        /// <param name="trace">The trace.</param>
        public void SetTrace(string trace)
        {
            this.trace = trace;
        }
    }
}
